package inject

import (
	"gitee.com/kordar/layuiadmin/admin/controller"
	"gitee.com/kordar/layuiadmin/admin/repository"
	"gitee.com/kordar/layuiadmin/admin/service"
	"github.com/kordar/gocrud"
	"github.com/mojocn/base64Captcha"
	"go.uber.org/dig"
	"gorm.io/gorm"
)

type GoAdminDB struct {
	dig.In
	DB *gorm.DB `name:"mysql.sys"`
}

type ControllerParams struct {
	dig.In
	service.AdminService
	Captcha *base64Captcha.Captcha `name:"captcha.login"`
	Repos   *repository.AdminRepository
}

type RouterParams struct {
	dig.In
	AuthCtrl   *controller.AuthController
	AdminCtrl  *controller.AdminController
	HomeCtrl   *controller.HomeController
	AdminRepos *repository.AdminRepository
}

type ResourceServiceParams struct {
	dig.In
	Services []gocrud.ResourceService `group:"resource-services"`
}
